Accusoft.BarcodeXpress10.Net
Code 128 and EAN 128

Code 128 provides excellent density for all-numeric data and good density for alphanumeric data. The symbol can be as long as necessary to store the encoded data. It is often selected over Code 39 in new applications because of its density and because it offers a much larger selection of characters. Code 128 is designed to encode all 128 ASCII characters.

A Code 128 can actually be divided into three subsets A, B, and C. There are three separate start codes to indicate which subset is being used. In addition, each subset includes control characters to switch to another subset in the middle of a barcode.

Although Code 128 was originally created as a 7 bit ASCII code, the 2007 update of the ISO-15417 Specification, Section 4.3.4.2 (d), describes a method for encoding of byte values from 128-255. Barcode Xpress conforms to this specification. Data in the range 128-255 is referred to as extended character set data, and can be used to encode data outside the normal ASCII range.

  • Note on writing - The BarcodeValue property of the WriterBase class is interpreted as an ASCII string. For this reason, if you are writing containing extended character set data, you should use the BarcodeData property rather than the BarcodeValue property.
  • Note on reading - The BarcodeValue property of the Result class is an ASCII string. Any character outside the printable ASCII range (decimal 31, for example) is represented as "?". If you wish to interpret the barcode data according to another character set, such as ISO 8859-1, use the BarcodeDataAsByte property instead of BarcodeValue.

When the BarcodeType property is set to write a Code 128 barcode, Barcode Xpress will automatically switch between the three character sets (A, B, and C) to code the data in the shortest form.

Barcode Xpress will generate an error if you have characters in your barcode value that are not allowed.

Each character is 11 times the width of the most narrow bar. Each character consists of 3 bars and 3 spaces. The bars always use an even number of elements and the spaces use an odd number. This provides the basis for a character-by-character consistency check during scanning. In addition, each Code 128 barcode includes a Modulo 103 checksum.

Code 128 requires a quiet zone, which should be at least the width of 10 narrow bars. This means that if you set the MinimumBarWidth property to 3 pixels (narrow bar size), you should set the HorizontalWhiteSpace property to 30 pixels.

See Also

 

 


©2015. Accusoft Corporation. All Rights Reserved.

Send Feedback